<!-- HTML header for doxygen 1.8.6-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<title>OpenCV: G-API Video processing functionality</title>
<link href="../../opencv.ico" rel="shortcut icon" type="image/x-icon" />
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<script type="text/javascript" src="../../tutorial-utils.js"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
//<![CDATA[
MathJax.Hub.Config(
{
  TeX: {
      Macros: {
          matTT: [ "\\[ \\left|\\begin{array}{ccc} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{array}\\right| \\]", 9],
          fork: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ \\end{array} \\right.", 4],
          forkthree: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ \\end{array} \\right.", 6],
          forkfour: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ #7 & \\mbox{#8}\\\\ \\end{array} \\right.", 8],
          vecthree: ["\\begin{bmatrix} #1\\\\ #2\\\\ #3 \\end{bmatrix}", 3],
          vecthreethree: ["\\begin{bmatrix} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{bmatrix}", 9],
          cameramatrix: ["#1 = \\begin{bmatrix} f_x & 0 & c_x\\\\ 0 & f_y & c_y\\\\ 0 & 0 & 1 \\end{bmatrix}", 1],
          distcoeffs: ["(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6 [, s_1, s_2, s_3, s_4[, \\tau_x, \\tau_y]]]]) \\text{ of 4, 5, 8, 12 or 14 elements}"],
          distcoeffsfisheye: ["(k_1, k_2, k_3, k_4)"],
          hdotsfor: ["\\dots", 1],
          mathbbm: ["\\mathbb{#1}", 1],
          bordermatrix: ["\\matrix{#1}", 1]
      }
  }
}
);
//]]>
</script><script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
<link href="../../stylesheet.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<!--#include virtual="/google-search.html"-->
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="../../opencv-logo-small.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">OpenCV
   &#160;<span id="projectnumber">4.5.2</span>
   </div>
   <div id="projectbrief">Open Source Computer Vision</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('../../',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">G-API Video processing functionality</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gaab6a9c8473dbb256ec55865ee189b417"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d55/group__gapi__video.html#gaab6a9c8473dbb256ec55865ee189b417">cv::gapi::BackgroundSubtractor</a> (const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp;src, const <a class="el" href="../../d4/d7d/structcv_1_1gapi_1_1video_1_1BackgroundSubtractorParams.html">cv::gapi::video::BackgroundSubtractorParams</a> &amp;bsParams)</td></tr>
<tr class="memdesc:gaab6a9c8473dbb256ec55865ee189b417"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gaussian Mixture-based or K-nearest neighbours-based Background/Foreground Segmentation <a class="el" href="../../d3/d46/classcv_1_1Algorithm.html" title="This is a base class for all more or less complex algorithms in OpenCV. ">Algorithm</a>. The operation generates a foreground mask.  <a href="../../d4/d55/group__gapi__video.html#gaab6a9c8473dbb256ec55865ee189b417">More...</a><br /></td></tr>
<tr class="separator:gaab6a9c8473dbb256ec55865ee189b417"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gacb49bc39f119eb75cf7095193f5ee1e3"><td class="memItemLeft" align="right" valign="top">std::tuple&lt; <a class="el" href="../../d3/d44/classcv_1_1GArray.html">GArray</a>&lt; <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &gt;, <a class="el" href="../../d9/d98/classcv_1_1GScalar.html">GScalar</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d55/group__gapi__video.html#gacb49bc39f119eb75cf7095193f5ee1e3">cv::gapi::buildOpticalFlowPyramid</a> (const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp;img, const <a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a> &amp;winSize, const <a class="el" href="../../d9/d98/classcv_1_1GScalar.html">GScalar</a> &amp;maxLevel, bool withDerivatives=true, int pyrBorder=<a class="el" href="../../d2/de8/group__core__array.html#gga209f2f4869e304c82d07739337eae7c5ab3c5a6143d8120b95005fa7105a10bb4">BORDER_REFLECT_101</a>, int derivBorder=<a class="el" href="../../d2/de8/group__core__array.html#gga209f2f4869e304c82d07739337eae7c5aed2e4346047e265c8c5a6d0276dcd838">BORDER_CONSTANT</a>, bool tryReuseInputImage=true)</td></tr>
<tr class="memdesc:gacb49bc39f119eb75cf7095193f5ee1e3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs the image pyramid which can be passed to calcOpticalFlowPyrLK.  <a href="../../d4/d55/group__gapi__video.html#gacb49bc39f119eb75cf7095193f5ee1e3">More...</a><br /></td></tr>
<tr class="separator:gacb49bc39f119eb75cf7095193f5ee1e3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2f103dc31d82a7db52afbc141ce2bd53"><td class="memItemLeft" align="right" valign="top">std::tuple&lt; <a class="el" href="../../d3/d44/classcv_1_1GArray.html">GArray</a>&lt; <a class="el" href="../../dc/d84/group__core__basic.html#ga7d080aa40de011e4410bca63385ffe2a">Point2f</a> &gt;, <a class="el" href="../../d3/d44/classcv_1_1GArray.html">GArray</a>&lt; <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga65f85814a8290f9797005d3b28e7e5fc">uchar</a> &gt;, <a class="el" href="../../d3/d44/classcv_1_1GArray.html">GArray</a>&lt; float &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d55/group__gapi__video.html#ga2f103dc31d82a7db52afbc141ce2bd53">cv::gapi::calcOpticalFlowPyrLK</a> (const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp;prevImg, const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp;nextImg, const <a class="el" href="../../d3/d44/classcv_1_1GArray.html">GArray</a>&lt; <a class="el" href="../../dc/d84/group__core__basic.html#ga7d080aa40de011e4410bca63385ffe2a">Point2f</a> &gt; &amp;prevPts, const <a class="el" href="../../d3/d44/classcv_1_1GArray.html">GArray</a>&lt; <a class="el" href="../../dc/d84/group__core__basic.html#ga7d080aa40de011e4410bca63385ffe2a">Point2f</a> &gt; &amp;predPts, const <a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a> &amp;winSize=<a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a>(21, 21), const <a class="el" href="../../d9/d98/classcv_1_1GScalar.html">GScalar</a> &amp;maxLevel=3, const <a class="el" href="../../d9/d5d/classcv_1_1TermCriteria.html">TermCriteria</a> &amp;criteria=<a class="el" href="../../d9/d5d/classcv_1_1TermCriteria.html">TermCriteria</a>(<a class="el" href="../../d9/d5d/classcv_1_1TermCriteria.html#a56fecdc291ccaba8aad27d67ccf72c57aeb9da694ea67b3ef7d524521b580867d">TermCriteria::COUNT</a>|<a class="el" href="../../d9/d5d/classcv_1_1TermCriteria.html#a56fecdc291ccaba8aad27d67ccf72c57a857609e73e7028e638d2ea649f3b45d5">TermCriteria::EPS</a>, 30, 0.01), int flags=0, double minEigThresh=1e-4)</td></tr>
<tr class="memdesc:ga2f103dc31d82a7db52afbc141ce2bd53"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculates an optical flow for a sparse feature set using the iterative Lucas-Kanade method with pyramids.  <a href="../../d4/d55/group__gapi__video.html#ga2f103dc31d82a7db52afbc141ce2bd53">More...</a><br /></td></tr>
<tr class="separator:ga2f103dc31d82a7db52afbc141ce2bd53"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga75d083db1d59c5b1eed0d4ba71461ab7"><td class="memItemLeft" align="right" valign="top">std::tuple&lt; <a class="el" href="../../d3/d44/classcv_1_1GArray.html">GArray</a>&lt; <a class="el" href="../../dc/d84/group__core__basic.html#ga7d080aa40de011e4410bca63385ffe2a">Point2f</a> &gt;, <a class="el" href="../../d3/d44/classcv_1_1GArray.html">GArray</a>&lt; <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga65f85814a8290f9797005d3b28e7e5fc">uchar</a> &gt;, <a class="el" href="../../d3/d44/classcv_1_1GArray.html">GArray</a>&lt; float &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d55/group__gapi__video.html#ga75d083db1d59c5b1eed0d4ba71461ab7">cv::gapi::calcOpticalFlowPyrLK</a> (const <a class="el" href="../../d3/d44/classcv_1_1GArray.html">GArray</a>&lt; <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &gt; &amp;prevPyr, const <a class="el" href="../../d3/d44/classcv_1_1GArray.html">GArray</a>&lt; <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &gt; &amp;nextPyr, const <a class="el" href="../../d3/d44/classcv_1_1GArray.html">GArray</a>&lt; <a class="el" href="../../dc/d84/group__core__basic.html#ga7d080aa40de011e4410bca63385ffe2a">Point2f</a> &gt; &amp;prevPts, const <a class="el" href="../../d3/d44/classcv_1_1GArray.html">GArray</a>&lt; <a class="el" href="../../dc/d84/group__core__basic.html#ga7d080aa40de011e4410bca63385ffe2a">Point2f</a> &gt; &amp;predPts, const <a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a> &amp;winSize=<a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a>(21, 21), const <a class="el" href="../../d9/d98/classcv_1_1GScalar.html">GScalar</a> &amp;maxLevel=3, const <a class="el" href="../../d9/d5d/classcv_1_1TermCriteria.html">TermCriteria</a> &amp;criteria=<a class="el" href="../../d9/d5d/classcv_1_1TermCriteria.html">TermCriteria</a>(<a class="el" href="../../d9/d5d/classcv_1_1TermCriteria.html#a56fecdc291ccaba8aad27d67ccf72c57aeb9da694ea67b3ef7d524521b580867d">TermCriteria::COUNT</a>|<a class="el" href="../../d9/d5d/classcv_1_1TermCriteria.html#a56fecdc291ccaba8aad27d67ccf72c57a857609e73e7028e638d2ea649f3b45d5">TermCriteria::EPS</a>, 30, 0.01), int flags=0, double minEigThresh=1e-4)</td></tr>
<tr class="separator:ga75d083db1d59c5b1eed0d4ba71461ab7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga01d36765f6c877f577f15f04850ffa19"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d55/group__gapi__video.html#ga01d36765f6c877f577f15f04850ffa19">cv::gapi::KalmanFilter</a> (const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp;measurement, const <a class="el" href="../../de/dfd/classcv_1_1GOpaque.html">GOpaque</a>&lt; bool &gt; &amp;haveMeasurement, const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp;control, const <a class="el" href="../../d7/df7/structcv_1_1gapi_1_1KalmanParams.html">cv::gapi::KalmanParams</a> &amp;kfParams)</td></tr>
<tr class="memdesc:ga01d36765f6c877f577f15f04850ffa19"><td class="mdescLeft">&#160;</td><td class="mdescRight">Standard Kalman filter algorithm <a href="http://en.wikipedia.org/wiki/Kalman_filter">http://en.wikipedia.org/wiki/Kalman_filter</a>.  <a href="../../d4/d55/group__gapi__video.html#ga01d36765f6c877f577f15f04850ffa19">More...</a><br /></td></tr>
<tr class="separator:ga01d36765f6c877f577f15f04850ffa19"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0b18fdc215bb554b34f01099c85df2c7"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d55/group__gapi__video.html#ga0b18fdc215bb554b34f01099c85df2c7">cv::gapi::KalmanFilter</a> (const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp;measurement, const <a class="el" href="../../de/dfd/classcv_1_1GOpaque.html">GOpaque</a>&lt; bool &gt; &amp;haveMeasurement, const <a class="el" href="../../d7/df7/structcv_1_1gapi_1_1KalmanParams.html">cv::gapi::KalmanParams</a> &amp;kfParams)</td></tr>
<tr class="separator:ga0b18fdc215bb554b34f01099c85df2c7"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<h2 class="groupheader">Function Documentation</h2>
<a id="gaab6a9c8473dbb256ec55865ee189b417"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaab6a9c8473dbb256ec55865ee189b417">&#9670;&nbsp;</a></span>BackgroundSubtractor()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> cv::gapi::BackgroundSubtractor </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp;&#160;</td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../d4/d7d/structcv_1_1gapi_1_1video_1_1BackgroundSubtractorParams.html">cv::gapi::video::BackgroundSubtractorParams</a> &amp;&#160;</td>
          <td class="paramname"><em>bsParams</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><code>#include &lt;<a class="el" href="../../d6/deb/gapi_2include_2opencv2_2gapi_2video_8hpp.html">opencv2/gapi/video.hpp</a>&gt;</code></p>

<p>Gaussian Mixture-based or K-nearest neighbours-based Background/Foreground Segmentation <a class="el" href="../../d3/d46/classcv_1_1Algorithm.html" title="This is a base class for all more or less complex algorithms in OpenCV. ">Algorithm</a>. The operation generates a foreground mask. </p>
<dl class="section return"><dt>Returns</dt><dd>Output image is foreground mask, i.e. 8-bit unsigned 1-channel (binary) matrix <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga81df635441b21f532fdace401e04f588">CV_8UC1</a>.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>Functional textual ID is "org.opencv.video.BackgroundSubtractor"</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>input image: Floating point frame is used without scaling and should be in range [0,255]. </td></tr>
    <tr><td class="paramname">bsParams</td><td>Set of initialization parameters for Background Subtractor kernel. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gacb49bc39f119eb75cf7095193f5ee1e3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gacb49bc39f119eb75cf7095193f5ee1e3">&#9670;&nbsp;</a></span>buildOpticalFlowPyramid()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::tuple&lt;<a class="el" href="../../d3/d44/classcv_1_1GArray.html">GArray</a>&lt;<a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a>&gt;, <a class="el" href="../../d9/d98/classcv_1_1GScalar.html">GScalar</a>&gt; cv::gapi::buildOpticalFlowPyramid </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp;&#160;</td>
          <td class="paramname"><em>img</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a> &amp;&#160;</td>
          <td class="paramname"><em>winSize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../d9/d98/classcv_1_1GScalar.html">GScalar</a> &amp;&#160;</td>
          <td class="paramname"><em>maxLevel</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>withDerivatives</em> = <code>true</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>pyrBorder</em> = <code><a class="el" href="../../d2/de8/group__core__array.html#gga209f2f4869e304c82d07739337eae7c5ab3c5a6143d8120b95005fa7105a10bb4">BORDER_REFLECT_101</a></code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>derivBorder</em> = <code><a class="el" href="../../d2/de8/group__core__array.html#gga209f2f4869e304c82d07739337eae7c5aed2e4346047e265c8c5a6d0276dcd838">BORDER_CONSTANT</a></code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>tryReuseInputImage</em> = <code>true</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><code>#include &lt;<a class="el" href="../../d6/deb/gapi_2include_2opencv2_2gapi_2video_8hpp.html">opencv2/gapi/video.hpp</a>&gt;</code></p>

<p>Constructs the image pyramid which can be passed to calcOpticalFlowPyrLK. </p>
<dl class="section note"><dt>Note</dt><dd>Function textual ID is "org.opencv.video.buildOpticalFlowPyramid"</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">img</td><td>8-bit input image. </td></tr>
    <tr><td class="paramname">winSize</td><td>window size of optical flow algorithm. Must be not less than winSize argument of calcOpticalFlowPyrLK. It is needed to calculate required padding for pyramid levels. </td></tr>
    <tr><td class="paramname">maxLevel</td><td>0-based maximal pyramid level number. </td></tr>
    <tr><td class="paramname">withDerivatives</td><td>set to precompute gradients for the every pyramid level. If pyramid is constructed without the gradients then calcOpticalFlowPyrLK will calculate them internally. </td></tr>
    <tr><td class="paramname">pyrBorder</td><td>the border mode for pyramid layers. </td></tr>
    <tr><td class="paramname">derivBorder</td><td>the border mode for gradients. </td></tr>
    <tr><td class="paramname">tryReuseInputImage</td><td>put ROI of input image into the pyramid if possible. You can pass false to force data copying.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>output pyramid.</li>
<li>number of levels in constructed pyramid. Can be less than maxLevel. </li>
</ul>
</dd></dl>

</div>
</div>
<a id="ga2f103dc31d82a7db52afbc141ce2bd53"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga2f103dc31d82a7db52afbc141ce2bd53">&#9670;&nbsp;</a></span>calcOpticalFlowPyrLK() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::tuple&lt;<a class="el" href="../../d3/d44/classcv_1_1GArray.html">GArray</a>&lt;<a class="el" href="../../dc/d84/group__core__basic.html#ga7d080aa40de011e4410bca63385ffe2a">Point2f</a>&gt;, <a class="el" href="../../d3/d44/classcv_1_1GArray.html">GArray</a>&lt;<a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga65f85814a8290f9797005d3b28e7e5fc">uchar</a>&gt;, <a class="el" href="../../d3/d44/classcv_1_1GArray.html">GArray</a>&lt;float&gt; &gt; cv::gapi::calcOpticalFlowPyrLK </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp;&#160;</td>
          <td class="paramname"><em>prevImg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp;&#160;</td>
          <td class="paramname"><em>nextImg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../d3/d44/classcv_1_1GArray.html">GArray</a>&lt; <a class="el" href="../../dc/d84/group__core__basic.html#ga7d080aa40de011e4410bca63385ffe2a">Point2f</a> &gt; &amp;&#160;</td>
          <td class="paramname"><em>prevPts</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../d3/d44/classcv_1_1GArray.html">GArray</a>&lt; <a class="el" href="../../dc/d84/group__core__basic.html#ga7d080aa40de011e4410bca63385ffe2a">Point2f</a> &gt; &amp;&#160;</td>
          <td class="paramname"><em>predPts</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a> &amp;&#160;</td>
          <td class="paramname"><em>winSize</em> = <code><a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a>(21,&#160;21)</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../d9/d98/classcv_1_1GScalar.html">GScalar</a> &amp;&#160;</td>
          <td class="paramname"><em>maxLevel</em> = <code>3</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../d9/d5d/classcv_1_1TermCriteria.html">TermCriteria</a> &amp;&#160;</td>
          <td class="paramname"><em>criteria</em> = <code><a class="el" href="../../d9/d5d/classcv_1_1TermCriteria.html">TermCriteria</a>(<a class="el" href="../../d9/d5d/classcv_1_1TermCriteria.html#a56fecdc291ccaba8aad27d67ccf72c57aeb9da694ea67b3ef7d524521b580867d">TermCriteria::COUNT</a>|<a class="el" href="../../d9/d5d/classcv_1_1TermCriteria.html#a56fecdc291ccaba8aad27d67ccf72c57a857609e73e7028e638d2ea649f3b45d5">TermCriteria::EPS</a>,&#160;30,&#160;0.01)</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>flags</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>minEigThresh</em> = <code>1e-4</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><code>#include &lt;<a class="el" href="../../d6/deb/gapi_2include_2opencv2_2gapi_2video_8hpp.html">opencv2/gapi/video.hpp</a>&gt;</code></p>

<p>Calculates an optical flow for a sparse feature set using the iterative Lucas-Kanade method with pyramids. </p>
<p>See <a class="el" href="../../d0/de3/citelist.html#CITEREF_Bouguet00">[30]</a> .</p>
<dl class="section note"><dt>Note</dt><dd>Function textual ID is "org.opencv.video.calcOpticalFlowPyrLK"</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">prevImg</td><td>first 8-bit input image (<a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a>) or pyramid (GArray&lt;GMat&gt;) constructed by buildOpticalFlowPyramid. </td></tr>
    <tr><td class="paramname">nextImg</td><td>second input image (<a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a>) or pyramid (GArray&lt;GMat&gt;) of the same size and the same type as prevImg. </td></tr>
    <tr><td class="paramname">prevPts</td><td><a class="el" href="../../d3/d44/classcv_1_1GArray.html">GArray</a> of 2D points for which the flow needs to be found; point coordinates must be single-precision floating-point numbers. </td></tr>
    <tr><td class="paramname">predPts</td><td><a class="el" href="../../d3/d44/classcv_1_1GArray.html">GArray</a> of 2D points initial for the flow search; make sense only when OPTFLOW_USE_INITIAL_FLOW flag is passed; in that case the vector must have the same size as in the input. </td></tr>
    <tr><td class="paramname">winSize</td><td>size of the search window at each pyramid level. </td></tr>
    <tr><td class="paramname">maxLevel</td><td>0-based maximal pyramid level number; if set to 0, pyramids are not used (single level), if set to 1, two levels are used, and so on; if pyramids are passed to input then algorithm will use as many levels as pyramids have but no more than maxLevel. </td></tr>
    <tr><td class="paramname">criteria</td><td>parameter, specifying the termination criteria of the iterative search algorithm (after the specified maximum number of iterations criteria.maxCount or when the search window moves by less than criteria.epsilon). </td></tr>
    <tr><td class="paramname">flags</td><td>operation flags:<ul>
<li><b>OPTFLOW_USE_INITIAL_FLOW</b> uses initial estimations, stored in nextPts; if the flag is not set, then prevPts is copied to nextPts and is considered the initial estimate.</li>
<li><b>OPTFLOW_LK_GET_MIN_EIGENVALS</b> use minimum eigen values as an error measure (see minEigThreshold description); if the flag is not set, then <a class="el" href="../../d4/d7f/structcv_1_1L1.html">L1</a> distance between patches around the original and a moved point, divided by number of pixels in a window, is used as a error measure. </li>
</ul>
</td></tr>
    <tr><td class="paramname">minEigThresh</td><td>the algorithm calculates the minimum eigen value of a 2x2 normal matrix of optical flow equations (this matrix is called a spatial gradient matrix in <a class="el" href="../../d0/de3/citelist.html#CITEREF_Bouguet00">[30]</a>), divided by number of pixels in a window; if this value is less than minEigThreshold, then a corresponding feature is filtered out and its flow is not processed, so it allows to remove bad points and get a performance boost.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li><a class="el" href="../../d3/d44/classcv_1_1GArray.html">GArray</a> of 2D points (with single-precision floating-point coordinates) containing the calculated new positions of input features in the second image.</li>
<li>status <a class="el" href="../../d3/d44/classcv_1_1GArray.html">GArray</a> (of unsigned chars); each element of the vector is set to 1 if the flow for the corresponding features has been found, otherwise, it is set to 0.</li>
<li><a class="el" href="../../d3/d44/classcv_1_1GArray.html">GArray</a> of errors (doubles); each element of the vector is set to an error for the corresponding feature, type of the error measure can be set in flags parameter; if the flow wasn't found then the error is not defined (use the status parameter to find such cases). </li>
</ul>
</dd></dl>

</div>
</div>
<a id="ga75d083db1d59c5b1eed0d4ba71461ab7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga75d083db1d59c5b1eed0d4ba71461ab7">&#9670;&nbsp;</a></span>calcOpticalFlowPyrLK() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::tuple&lt;<a class="el" href="../../d3/d44/classcv_1_1GArray.html">GArray</a>&lt;<a class="el" href="../../dc/d84/group__core__basic.html#ga7d080aa40de011e4410bca63385ffe2a">Point2f</a>&gt;, <a class="el" href="../../d3/d44/classcv_1_1GArray.html">GArray</a>&lt;<a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga65f85814a8290f9797005d3b28e7e5fc">uchar</a>&gt;, <a class="el" href="../../d3/d44/classcv_1_1GArray.html">GArray</a>&lt;float&gt; &gt; cv::gapi::calcOpticalFlowPyrLK </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../d3/d44/classcv_1_1GArray.html">GArray</a>&lt; <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &gt; &amp;&#160;</td>
          <td class="paramname"><em>prevPyr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../d3/d44/classcv_1_1GArray.html">GArray</a>&lt; <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &gt; &amp;&#160;</td>
          <td class="paramname"><em>nextPyr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../d3/d44/classcv_1_1GArray.html">GArray</a>&lt; <a class="el" href="../../dc/d84/group__core__basic.html#ga7d080aa40de011e4410bca63385ffe2a">Point2f</a> &gt; &amp;&#160;</td>
          <td class="paramname"><em>prevPts</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../d3/d44/classcv_1_1GArray.html">GArray</a>&lt; <a class="el" href="../../dc/d84/group__core__basic.html#ga7d080aa40de011e4410bca63385ffe2a">Point2f</a> &gt; &amp;&#160;</td>
          <td class="paramname"><em>predPts</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a> &amp;&#160;</td>
          <td class="paramname"><em>winSize</em> = <code><a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a>(21,&#160;21)</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../d9/d98/classcv_1_1GScalar.html">GScalar</a> &amp;&#160;</td>
          <td class="paramname"><em>maxLevel</em> = <code>3</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../d9/d5d/classcv_1_1TermCriteria.html">TermCriteria</a> &amp;&#160;</td>
          <td class="paramname"><em>criteria</em> = <code><a class="el" href="../../d9/d5d/classcv_1_1TermCriteria.html">TermCriteria</a>(<a class="el" href="../../d9/d5d/classcv_1_1TermCriteria.html#a56fecdc291ccaba8aad27d67ccf72c57aeb9da694ea67b3ef7d524521b580867d">TermCriteria::COUNT</a>|<a class="el" href="../../d9/d5d/classcv_1_1TermCriteria.html#a56fecdc291ccaba8aad27d67ccf72c57a857609e73e7028e638d2ea649f3b45d5">TermCriteria::EPS</a>,&#160;30,&#160;0.01)</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>flags</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>minEigThresh</em> = <code>1e-4</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><code>#include &lt;<a class="el" href="../../d6/deb/gapi_2include_2opencv2_2gapi_2video_8hpp.html">opencv2/gapi/video.hpp</a>&gt;</code></p>
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p><dl class="section note"><dt>Note</dt><dd>Function textual ID is "org.opencv.video.calcOpticalFlowPyrLKForPyr" </dd></dl>

</div>
</div>
<a id="ga01d36765f6c877f577f15f04850ffa19"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga01d36765f6c877f577f15f04850ffa19">&#9670;&nbsp;</a></span>KalmanFilter() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> cv::gapi::KalmanFilter </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp;&#160;</td>
          <td class="paramname"><em>measurement</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../de/dfd/classcv_1_1GOpaque.html">GOpaque</a>&lt; bool &gt; &amp;&#160;</td>
          <td class="paramname"><em>haveMeasurement</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp;&#160;</td>
          <td class="paramname"><em>control</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../d7/df7/structcv_1_1gapi_1_1KalmanParams.html">cv::gapi::KalmanParams</a> &amp;&#160;</td>
          <td class="paramname"><em>kfParams</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><code>#include &lt;<a class="el" href="../../d6/deb/gapi_2include_2opencv2_2gapi_2video_8hpp.html">opencv2/gapi/video.hpp</a>&gt;</code></p>

<p>Standard Kalman filter algorithm <a href="http://en.wikipedia.org/wiki/Kalman_filter">http://en.wikipedia.org/wiki/Kalman_filter</a>. </p>
<dl class="section note"><dt>Note</dt><dd>Functional textual ID is "org.opencv.video.KalmanFilter"</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">measurement</td><td>input matrix: 32-bit or 64-bit float 1-channel matrix containing measurements. </td></tr>
    <tr><td class="paramname">haveMeasurement</td><td>dynamic input flag that indicates whether we get measurements at a particular iteration . </td></tr>
    <tr><td class="paramname">control</td><td>input matrix: 32-bit or 64-bit float 1-channel matrix contains control data for changing dynamic system. </td></tr>
    <tr><td class="paramname">kfParams</td><td>Set of initialization parameters for Kalman filter kernel.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Output matrix is predicted or corrected state. They can be 32-bit or 64-bit float 1-channel matrix <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga32ec76240e43e4c9c7b2e2785180a7e6">CV_32FC1</a> or <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga3b256d68c6002b6afd60ab9538d717a8">CV_64FC1</a>.</dd></dl>
<p>If measurement matrix is given (haveMeasurements == true), corrected state will be returned which corresponds to the pipeline cv::KalmanFilter::predict(control) -&gt; cv::KalmanFilter::correct(measurement). Otherwise, predicted state will be returned which corresponds to the call of cv::KalmanFilter::predict(control). </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="../../dd/d6a/classcv_1_1KalmanFilter.html" title="Kalman filter class. ">cv::KalmanFilter</a> </dd></dl>

</div>
</div>
<a id="ga0b18fdc215bb554b34f01099c85df2c7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga0b18fdc215bb554b34f01099c85df2c7">&#9670;&nbsp;</a></span>KalmanFilter() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> cv::gapi::KalmanFilter </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp;&#160;</td>
          <td class="paramname"><em>measurement</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../de/dfd/classcv_1_1GOpaque.html">GOpaque</a>&lt; bool &gt; &amp;&#160;</td>
          <td class="paramname"><em>haveMeasurement</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../d7/df7/structcv_1_1gapi_1_1KalmanParams.html">cv::gapi::KalmanParams</a> &amp;&#160;</td>
          <td class="paramname"><em>kfParams</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><code>#include &lt;<a class="el" href="../../d6/deb/gapi_2include_2opencv2_2gapi_2video_8hpp.html">opencv2/gapi/video.hpp</a>&gt;</code></p>
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. The case of Standard Kalman filter algorithm when there is no control in a dynamic system. In this case the controlMatrix is empty and control vector is absent.</p>
<dl class="section note"><dt>Note</dt><dd>Function textual ID is "org.opencv.video.KalmanFilterNoControl"</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">measurement</td><td>input matrix: 32-bit or 64-bit float 1-channel matrix containing measurements. </td></tr>
    <tr><td class="paramname">haveMeasurement</td><td>dynamic input flag that indicates whether we get measurements at a particular iteration. </td></tr>
    <tr><td class="paramname">kfParams</td><td>Set of initialization parameters for Kalman filter kernel.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Output matrix is predicted or corrected state. They can be 32-bit or 64-bit float 1-channel matrix <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga32ec76240e43e4c9c7b2e2785180a7e6">CV_32FC1</a> or <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga3b256d68c6002b6afd60ab9538d717a8">CV_64FC1</a>.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../dd/d6a/classcv_1_1KalmanFilter.html" title="Kalman filter class. ">cv::KalmanFilter</a> </dd></dl>

</div>
</div>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.6-->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Apr 2 2021 11:36:41 for OpenCV by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="../../doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
<script type="text/javascript">
//<![CDATA[
addTutorialsButtons();
//]]>
</script>
</body>
</html>
